package de.backtomedieval.research;

import de.backtomedieval.R;
import de.backtomedieval.main.Game;
import de.backtomedieval.units.Halberdier;
import de.backtomedieval.units.Hoplit;
import de.backtomedieval.units.LongSwordsman;
import de.backtomedieval.units.ShortSwordsman;
import de.backtomedieval.units.Spearman;
import de.backtomedieval.units.TwoHandedSwordman;

public class Edged_Blades extends AbstractResearch {

	private static int baseResearchPoints = 800;
	
	
	public Edged_Blades() {
		this.setBaseResearchPoints(baseResearchPoints);
	}
	
	@Override
	public String getName() {
		return Game.getString(R.string.research_edged_blades);
	}
	
	protected void onLevelUp(Technology technology) {
		technology.setShortSwordsmanAttackBonus(calculateNewTechnologyPoints(ShortSwordsman.getBaseAttack(), technology.getShortSwordsmanAttackBonus(),getLevel(),10));
		technology.setLongSwordsmanAttackBonus(calculateNewTechnologyPoints(LongSwordsman.getBaseAttack(), technology.getLongSwordsmanAttackBonus(),getLevel(),10));
		technology.setTwoHandedSwordmanAttackBonus(calculateNewTechnologyPoints(TwoHandedSwordman.getBaseAttack(), technology.getTwoHandedSwordmanAttackBonus(),getLevel(),10));
	}

	@Override
	public String getResearchInfo(int level) {
		String info="";
		info += Game.getString(R.string.unit_shortswordman) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(ShortSwordsman.getBaseAttack(),level,10)+"<br>";
		info += Game.getString(R.string.unit_longswordman) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(LongSwordsman.getBaseAttack(),level,10)+"<br>";
		info += Game.getString(R.string.unit_twohandedswordman) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(TwoHandedSwordman.getBaseAttack(),level,10);
		return info;
	}

}
